<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html>
<head>
	<title>PHP ImageManager + Editor Standalone Demo</title>
	<script type="text/javascript" src="ImageManager/assets/dialog.js"></script>
	<script type="text/javascript" src="ImageManager/IMEStandalone.js"></script>
	<script type="text/javascript">
    //<![CDATA[

		//Create a new Imanager Manager, needs the directory where the manager is
		//and which language translation to use.
		var manager = new ImageManager('ImageManager','en');
		
		//Image Manager wrapper. Simply calls the ImageManager
		ImageSelector = 
		{
			//This is called when the user has selected a file
			//and clicked OK, see popManager in IMEStandalone to 
			//see the parameters returned.
			update : function(params)
			{
				if(this.field && this.field.value != null)
				{
					this.field.value = params.f_file; //params.f_url
				}
			},
			//open the Image Manager, updates the textfield
			//value when user has selected a file.
			select: function(textfieldID)
			{
				this.field = document.getElementById(textfieldID);
				manager.popManager(this);	
			}
		};	

    //]]>
    </script>
    <style type="text/css">
    /*<![CDATA[*/
        <!--
                .selectFile { width: 20em; } 
				body{margin: 2em;}
				form{margin: 5em;}
        -->
        /*]]>*/
    </style>
</head>

<body>
<h1>PHP ImageManager + Editor Standalone Demo</h1>
<form action="">
	<div>
		Please select an image file.
		<input type="text" id="file" class="selectFile" name="file" />
		<input type="button" name="select" value=" File " onclick="ImageSelector.select('file');"/>
	</div>
</form>
    <p>PHP Image Manager, Image Editor for HTMLArea. Requires PHP, GD or NetPBM or
    ImageMagick.</p>
    <p>Download from <a href="https://sourceforge.net/project/showfiles.php?group_id=92873" title="HTMLArea with PHP ImageManager + Editor">SourceForge</a></p>
    <p><a href="docs/index.html" title="PHP ImageManager + Editor">Documentation</a></p>
</body>
</html>
